﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CancelBorrow.aspx.cs" Inherits="Family_CancelBorrow" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>取消借阅</title>
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
        .style2
        {
            font-size: x-large;
            text-align: center;
            background-color: #CCCCCC;
        }
        .style3
        {
            text-align: right;
        }
        
        .hidden
        {
            display: none;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table class="style1">
            <tr>
                <td class="style2">
                    取消借阅（超过指定时间段）
                </td>
            </tr>
            <tr>
                <td class="style3">
                    <a href="ConfirmBookArrived.aspx" style="text-align: right">跳转到图书确认页</a>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Button ID="Button1" runat="server" Text="给当前借阅记录的双方家庭发送短信" OnClientClick="return confirm('给借阅双方发送短信吗？')"
                        OnClick="Button1_Click" />
                    &nbsp;共有记录<asp:Label ID="msg" runat="server" ForeColor="#FF3300" Style="font-weight: 700"></asp:Label>
                    条
                </td>
            </tr>
            <tr>
                <td>
                    <asp:GridView ID="gv" runat="server" AutoGenerateColumns="False" CellPadding="4"
                        DataKeyNames="ID" DataSourceID="gvdata" ForeColor="#333333" GridLines="None"
                        PageSize="16" Width="100%" AllowPaging="True" AllowSorting="True">
                        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                        <Columns>
                            <asp:CommandField ButtonType="Button" ShowSelectButton="True" />
                            <asp:BoundField DataField="ID" HeaderText="流水号" InsertVisible="False" ReadOnly="True"
                                SortExpression="ID" />
                            <asp:BoundField DataField="JUID" HeaderText="借阅人编号" SortExpression="JUID">
                                <FooterStyle CssClass="hidden" />
                                <HeaderStyle CssClass="hidden" />
                                <ItemStyle CssClass="hidden" />
                            </asp:BoundField>
                            <asp:BoundField DataField="CUID" HeaderText="持有人编号" SortExpression="CUID">
                                <FooterStyle CssClass="hidden" />
                                <HeaderStyle CssClass="hidden" />
                                <ItemStyle CssClass="hidden" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Bdate" HeaderText="借书时间点" SortExpression="Bdate">
                                <FooterStyle CssClass="hidden" />
                                <HeaderStyle CssClass="hidden" />
                                <ItemStyle CssClass="hidden" />
                            </asp:BoundField>
                            <asp:BoundField DataField="BID" HeaderText="图书编号" SortExpression="BID" />
                            <asp:BoundField DataField="书名" HeaderText="书名" ReadOnly="True" SortExpression="书名" />
                            <asp:BoundField DataField="图书流向" HeaderText="图书流向" ReadOnly="True" SortExpression="图书流向" />
                            <asp:BoundField DataField="借书学生" HeaderText="借书学生" ReadOnly="True" SortExpression="借书学生" />
                            <asp:BoundField DataField="年级1" HeaderText="年级1" ReadOnly="True" SortExpression="年级1" />
                            <asp:BoundField DataField="班级1" HeaderText="班级1" ReadOnly="True" SortExpression="班级1" />
                            <asp:BoundField DataField="电话1" HeaderText="电话1" ReadOnly="True" SortExpression="电话1" />
                            <asp:BoundField DataField="持有人姓名" HeaderText="持有人姓名" ReadOnly="True" SortExpression="持有人姓名" />
                            <asp:BoundField DataField="年级2" HeaderText="年级2" ReadOnly="True" SortExpression="年级2" />
                            <asp:BoundField DataField="班级2" HeaderText="班级2" ReadOnly="True" SortExpression="班级2" />
                            <asp:BoundField DataField="电话2" HeaderText="电话2" ReadOnly="True" SortExpression="电话2" />

                            <asp:BoundField DataField="bdate" HeaderText="借阅日期" ReadOnly="True" SortExpression="bdate" />

                            <asp:TemplateField ShowHeader="False">
                                <ItemTemplate>
                                    <asp:Button ID="Button1" runat="server" CausesValidation="False" OnClientClick="return confirm('确信删除此条吗？')"
                                        CommandName="Delete" Text="删除此条" />
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <EditRowStyle BackColor="#999999" />
                        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                        <PagerSettings Position="Top" />
                        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                        <SortedAscendingCellStyle BackColor="#E9E7E2" />
                        <SortedAscendingHeaderStyle BackColor="#506C8C" />
                        <SortedDescendingCellStyle BackColor="#FFFDF8" />
                        <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
                    </asp:GridView>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:SqlDataSource ID="gvdata" runat="server" ConnectionString="<%$ ConnectionStrings:DataConn %>"
                        SelectCommand="Cancel_Borrow_Book_Info_From_List" SelectCommandType="StoredProcedure" OnSelected="gvdata_Selected"
                        DeleteCommand="delete from borrow where id=@id">
                        <DeleteParameters>
                            <asp:Parameter Name="id" />
                        </DeleteParameters>
                    </asp:SqlDataSource>
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
